package com.zd.zdMerchant.sys.srv;

import com.zd.zdMerchant.common.utils.EncryptUtils;
import com.zd.zdMerchant.sys.dal.dao.ShopDao;
import com.zd.zdMerchant.sys.dal.domain.Shop;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zhangxiang
 * @Description
 * @date 2018/1/4 14:38
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ShopService{

    private Logger logger = LoggerFactory.getLogger(getClass());
    @Autowired
    private ShopDao shopDao;

    public Shop login(String phone, String password){
        return shopDao.loginByUsernameAndPassword(phone, EncryptUtils.encryptMD5(password));
    }

}
